{layout name="./base/base_back"}
		<link rel="stylesheet" type="text/css" href="/front/css/index.css"/>
		<link rel="stylesheet" type="text/css" href="/front/css/common.css"/>
		<link rel="stylesheet" type="text/css" href="/front/css/jquery-ui.css"/>
		<link rel="stylesheet" type="text/css" href="/front/css/weifeng.css"/>
		<script src="/front/js/jquery-ui.js"></script>
		<script src="/front/js/index.js"></script>
		<script src="/front/js/weifeng.js"></script>
		<script type="text/javascript">
			//数组状态：分享中
			var arr1 = [ "{$share|implode='","',###}"];
			//数组状态：分享成功
			var arr2 = [ "{$disables|implode='","',###}"];
			//判断日期，并设置其状态样式
			function selectedate(date) {
			  var d = formatterDate(date);
			  if($.inArray(d, arr2)!=-1){
			    return [false,'','分享成功'];
			  }else if($.inArray(d, arr1)!=-1){
			  	return [true,'green','分享中'];
			  }
			  else
			  return [false];
			}
		</script>
		<script type="text/javascript">
			$(function(){
				//获取要定位元素距离浏览器顶部的距离:费用信息表单页
				var bookcaravantH = $(".book-caravant").offset().top;
				var campH = $(".camp").offset().top-400;
				var bookcaravantW = $(".book-caravant").width();
				//滚动条事件
				$(window).scroll(function(){
					//获取滚动条的滑动距离
					var scroH = $(this).scrollTop();
					//滚动条的滑动距离大于等于定位元素距离浏览器顶部的距离，就固定，反之就不固定
					if(scroH >= bookcaravantH && scroH < campH){
						$(".book-caravant").css({"position":"fixed","top":"41px","z-index":"9999","width":bookcaravantW});
						$(".subnav").css({"display":"block"});
					}else if(scroH < bookcaravantH){
					  	$(".book-caravant").css({"position":"","z-index":"9999","top":"0"});
					  	$(".subnav").css({"display":"none"});
					}else if(scroH >= campH){
					  	$(".book-caravant").css({"position":"","z-index":"9999"});
					}
				})
			}); 
		</script>
		<!--地图插件-->
		<link rel="stylesheet" href="http://cache.amap.com/lbs/static/main1119.css"/>
		<script type="text/javascript" src="http://webapi.amap.com/maps?v=1.3&key=a7e2fc1a96a83283106bf583328aa248&plugin=AMap.Autocomplete"></script>
		<script type="text/javascript" src="http://cache.amap.com/lbs/static/addToolbar.js"></script>
		<!--顶部导航结束-->

		<!--内容部分开始-->
		<main>
			<div class="subnav w">
				<div class="page-subnav w1200">
					<ul class="subnav-list">
						<li>
							<a class="subnav-item fl" href="#fangchexinxi">房车信息</a>
						</li>
						<li>
							<a class="subnav-item fl" href="#fangchetupian">房车图片</a>
						</li>
						<li>
							<a class="subnav-item fl" href="#yingdijieshao">房车服务机构介绍</a>
						</li>
						<li>
							<a class="subnav-item fl" href="#camp_map">地理位置</a>
						</li>
					</ul>
				</div>
			</div>
			<div class="caravan-detail w">
				<!-- 房车封面图start -->
				<div class="photo">
					<div class="cover-photo"></div>
				</div>
				<!-- 房车封面图css开始 -->
				<style type="text/css">
					.caravan-detail .photo .cover-photo{
					  background-image:url("{php}if(!empty($caravancover['0'])){ echo $caravancover['0'];}else{echo '';}{/php}");
					  background-repeat: no-repeat;
					  background-size: cover;
					  background-position: 50% 50%;
					  background-color: #f5f5f5;
					  height: 100%;
					}
				</style>
				<!-- 房车封面图css结束 -->
				<!-- 房车封面图end -->
				<div class="panel">
					<div class="m0at pr w1200">
						<!-- 概况start -->
						<div class="summary fl">
							<div class="summaryL">
								<div class="media-photo-badge tc">
									<a class="media-photo media-round tc" href="###">
										<img class="host-profile-image"  src="{$head}">
									</a>
								</div>
							</div>
							<div class="summaryR fl">
								<div class="summaryRtop">
									<h3>{php}if(!empty($carinfo->name)){echo $carinfo->name;}else{echo '车主还没有命名';}{/php}</h3>
									<p><a href="###">{$carinfo.camps.name}</a></p>
									<p>地址：{$carinfo.camps.address} <a href="#camp_map">地图位置</a></p>
								</div>
								<div class="summaryRbtm">
									<div class="summaryicon fl tc">
										<img src="/front/img/zixingshiA.jpg">
										<p>{$carinfo->getCates($carinfo['driver_type'])}</p>
									</div>
									<div class="summaryicon fl tc">
										<img src="/front/img/kezhurenshu.jpg">
										<p>可住{$carinfo.people_num}人</p>
									</div>
									<div class="summaryicon fl tc">
										<img src="/front/img/bedicon.jpg">
										<p>{$carinfo.single_bed_num}张单人床和{$carinfo.double_bed_num}张双人床</p>
									</div>
									<div class="summaryicon fl tc">
										<img src="/front/img/restroom.jpg">
										<p>{$carinfo->getRadioName($carinfo['bathroom'])}洗手间</p>
									</div>
								</div>
							</div>
							<div class="cb"></div>
						</div>
						<!-- 概况end -->
						<!-- 预定表单start -->
						<div class="book-caravant fr pa">
							<div class="book-caravant-con">
								<div class="book-caravant-con-tit fr">
									<p>此处可更改日期<span class="fr">每晚</span></p>
								</div>
								<form method="get" action="/reserve/jumpwhich">
								<input type="hidden" name="id" value="{:input('id')}">
									<div class="book-panel fr mb15">
										<div class="datecheck">
											<div class="ckeckin fl mb15">
												<label class="book-caravant-label" for="datespan-checkin">入住<span id="sdateerror"></span></label>
												<input id="startdaterent1" type="text" name="sdate" class="datecheck-input w" value="{$ss}" placeholder="年-月-日">
											</div>
											<div class="ckeckout fl">
												<label class="book-caravant-label" for="datespan-checkin">离开<span id="edateerror"></span></label>
												<input id="endaterent1" type="text" name="edate" class="datecheck-input w" value="{$ee}" placeholder="年-月-日">
											</div>
										</div>
										<script type="text/javascript">
									    	$(function(){
									    		$("#startdaterent1,#endaterent1").datepicker({
												    minDate: 0,//可选择的最小日期
												    showOtherMonths: true,
												    selectOtherMonths: true,
												    beforeShowDay:selectedate,//日期状态返回函数
												    onSelect:function(dateText,inst){
												      	//$("#endaterent1").datepicker("option","minDate",dateText);
												      	$("#startdaterent1").datepicker("option","maxDate",dateText);
												      	//入住
													    var sdate = $('input[name="sdate"]').val();
										    			//不能为空
										    			if(!$.trim(sdate)) {
															$("input[name='sdate']").css({border: "1px solid red"});
															$("#sdateerror").html("请选择入住日期");
															return false;
										    			}else {
										    				$.get('/reserve/checkdateavailable?id={:input("id")}&sdate='+$("input[name='sdate']").val()+'&edate='+$("input[name='edate']").val(),function(data) {
																$("input[name='sdate']").css({border: "1px solid green"});
																$("#sdateerror").html("");
																if (data == 0) {
																	$("input[name='sdate']").css({border: "1px solid red"});
																	$("#sdateerror").html("不可住日期");
																}
															});
										    			}
										    			//钱数获取1
											    		$.get('/reserve/countdays?sdate='+$("input[name='sdate']").val()+'&edate='+$("input[name='edate']").val()+'&m={$campinfo.travel_money_base}',function(data) {
															$('#days').text(data.days);
															$('#money1').text(data.money);
															$('#money2').text(data.money);
														});
												    }
												});
									    		$("#startdaterent1,#endaterent1").datepicker({
												    minDate: 0,//可选择的最小日期
												    showOtherMonths: true,
												    selectOtherMonths: true,
												    beforeShowDay:selectedate,//日期状态返回函数
												    onSelect:function(dateText,inst){
												      	$("#endaterent1").datepicker("option","minDate",dateText);
												      	//$("#startdaterent1").datepicker("option","maxDate",dateText);
												      	//离开
														var edate = $('input[name="edate"]').val();
										    			//不能为空
										    			if(!$.trim(edate)) {
															$("input[name='edate']").css({border: "1px solid red"});
															$("#edateerror").html("请选择离开日期");
															return false;
										    			}else {
										    				$.get('/reserve/checkdateavailable?id={:input("id")}&sdate='+$("input[name='sdate']").val()+'&edate='+$("input[name='edate']").val(),function(data) {
																$("input[name='edate']").css({border: "1px solid green"});
																$("#edateerror").html("");
																if (data == 0) {
																	$("input[name='edate']").css({border: "1px solid red"});
																	$("#edateerror").html("不可住日期");
																}
															});
										    			}
										    			//钱数获取2
												    	$.get('/reserve/countdays?sdate='+$("input[name='sdate']").val()+'&edate='+$("input[name='edate']").val()+'&m={$campinfo.travel_money_base}',function(data) {
															$('#days').text(data.days);
															$('#money1').text(data.money);
															$('#money2').text(data.money);
														});
												    }
												});

									    	})
									    </script>			
										<div class="cb"></div>
										<div class="book-caravant-subtotal">
											<p class="subtotal-info mb15">
												<span>绿框日期可供使用。</span>
											</p>
											<table class="w">
												<tr class="price-item">
													<th class="price-item-header">
														<span><span id="days">{$days}</span>晚</span>&nbsp;
														<span>
														(旅行币)
														</span>
													</th>
													<td class="tr">
														<span id="money1">{$money}</span>
													</td>
												</tr>
												<tr class="price-item">
													<th class="price-item-header">
														<span>服务费</span>&nbsp;
														<span onmouseover="show(this,'codetips');" onmouseout="hide(this,'codetips');" style="position:absolute;">
															<i class="icon">?</i>
															<div id="codetips" style="display:none;border:1px solid silver;background:#eee;padding:10px;">服务费可以帮助我们维持平台运行，同时为您的旅程提供全面的服务。</div>
														</span>
														
													</th>
													<td class="tr">
														<span>¥0</span>
													</td>
												</tr>
												<tr class="price-item">
													<th class="price-item-header">
														<span>押金</span>&nbsp;
														<span onmouseover="show(this,'codetips1');" onmouseout="hide(this,'codetips1');" style="position:absolute;">
															<i class="icon">?</i>
															<div id="codetips1" style="display:none;border:1px solid silver;background:#eee;padding:10px;">平台收取一定押金，无物品损坏和车辆违章的情况下，客人离开后返还全部押金。</div>
														</span>
													</th>
													<td class="tr">
														<span>¥{$deposit}</span>
													</td>
												</tr>
												<tr class="price-item">
													<th class="price-item-header">
														<span>共需支付</span>
														<span>(旅行币)</span>
													</th>
													<td class="tr">
														<span id="money2" style="color:#ea5404;">{$money}</span><br>
														<span style="color:#ea5404;">押金¥{$deposit}</span>
													</td>
												</tr>
											</table>
										</div>
										<div class="book-caravant-btn">
											<button type="submit" class="w">预&nbsp;定</button>
										</div>
									</div>
								</form>
							</div>
						</div>
						<!-- 预定表单end -->
						<div class="cb"></div>
					</div>
					<!-- 详情start -->
					<div class="m0at w1200">
						<div class="p10">
							<div class="detail-tit-header">
								<h2 id="fangchexinxi">房车信息</h2>
							</div>
							<hr>
							<div class="details-section mt15">
								<div class="details-sectionL fl">基本信息</div>
								<div class="details-sectionR fl">
									<div class="details-sectionRl fl">
										<div class="mb15">
											<span>品牌：</span>
											<span>{$carinfo->getBrands($carinfo['car_brands_id'])}</span>
										</div>
										<div class="mb15">
											<span>车型：</span>
											<span>{$carinfo->getCates($carinfo['driver_type'])}</span>
										</div>
										<div class="mb15">
											<span>排挡：</span>
											<span>{$carinfo->getZiduan3Name($carinfo['speed'])}</span>
										</div>
										<div class="mb15">
											<span>厨房：</span>
											<span>{$carinfo->getRadioName($carinfo['kitchen'])}</span>
										</div>
										<div class="mb15">
											<span>入住时间：</span>
											<span>中午12:00之后</span>
										</div>
									</div>
									<div class="details-sectionRr fl">
										<div class="mb15">
											<span>国别：</span>
											<span>{$carinfo->getCountries($carinfo['car_countries_id'])}</span>
										</div>
										<div class="mb15">
											<span>车辆尺寸：</span>
											<span>{$carinfo.size}</span>
										</div>
										<div class="mb15">
											<span>准驾类型：</span>
											<span>{$carinfo->getDrtypes($carinfo['driver_type'])}</span>
										</div>
										<div class="mb15">
											<span>洗手间：</span>
											<span>{$carinfo->getRadioName($carinfo['bathroom'])}</span>
										</div>
										<div class="mb15">
											<span>离开时间：</span>
											<span>中午12:00之前</span>
										</div>
									</div>
									<div class="cb"></div>
								</div>
								<div class="cb"></div>
							</div>
							<hr>
							<div class="details-section mt15">
								<div class="details-sectionL fl">便利设施</div>
								<div class="details-sectionR fl">
									<div class="details-sectionRl fl">
										<div class="mb15">
											<span>网络：</span>
											<span>{$carinfo->getRadioName($carinfo['wifi'])}</span>
										</div>
										<div class="mb15">
											<span>电视：</span>
											<span>{$carinfo->getRadioName($carinfo['tv'])}</span>
										</div>
										<div class="mb15">
											<span>洗衣机：</span>
											<span>{$carinfo->getRadioName($carinfo['washer'])}</span>
										</div>
									</div>
									<div class="details-sectionRr fl">
										<div class="mb15">
											<span>空调：</span>
											<span>{$carinfo->getRadioName($carinfo['air_condition'])}</span>
										</div>
										<div class="mb15">
											<span>淋浴：</span>
											<span>{$carinfo->getRadioName($carinfo['the_shower'])}</span>
										</div>
									</div>
									<div class="cb"></div>
								</div>
								<div class="cb"></div>
							</div>
							<hr>
							<div class="details-section mt15">
								<div class="details-sectionL fl">安全设施</div>
								<div class="details-sectionR fl">
									<div class="details-sectionRl fl">
										<div class="mb15">
											<span>灭火器：</span>
											<span>{$carinfo->getRadioName($carinfo['extinguisher'])}</span>
										</div>
										<div class="mb15">
											<span>24小时无缝隙监控：</span>
											<span>{$carinfo->getRadioName($carinfo['monitored'])}</span>
										</div>
									</div>
									<div class="details-sectionRr fl">
										<div class="mb15">
											<span>报警器：</span>
											<span>{$carinfo->getRadioName($carinfo['annunciator'])}</span>
										</div>
									</div>
									<div class="cb"></div>
								</div>
								<div class="cb"></div>
							</div>
							<div class="detail-tit-header">
								<h2 id="fangchetupian">房车图片</h2>
							</div>
							<hr>
							<div class="details-section mt15">
								<div class="details-top-photo mr15 fl">
									<div class="details-photo details-top-photo01"></div>
								</div>
								<div class="details-top-photo fl">
									<div class="details-photo details-top-photo02"></div>
								</div>
								<div class="cb"></div>
							</div>
							<div class="details-section mt15">
								<div class="details-btm-photo mr15 fl">
									<div class="details-photo details-top-photo03"></div>
								</div>
								<div class="details-btm-photo mr15 fl">
									<div class="details-photo details-top-photo04"></div>
								</div>
								<div class="details-btm-photo fl">
									<div class="details-photo details-top-photo05"></div>
								</div>
								<div class="cb"></div>
							</div>
						</div>
						<style type="text/css">
							.details-top-photo01{
							  background-image: url("{php}if(!empty($picCaravan['0'])){ echo $picCaravan['0'];}else{echo '';}{/php}");
							}
							.details-top-photo02{
							  background-image: url("{php}if(!empty($picCaravan['1'])){ echo $picCaravan['1'];}else{echo '';}{/php}");
							}
							.details-top-photo03{
							  background-image: url("{php}if(!empty($picCaravan['2'])){ echo $picCaravan['2'];}else{echo '';}{/php}");
							}
							.details-top-photo04{
							  background-image: url("{php}if(!empty($picCaravan['3'])){ echo $picCaravan['3'];}else{echo '';}{/php}");
							}
							.details-top-photo05{
							  background-image: url("{php}if(!empty($picCaravan['4'])){ echo $picCaravan['4'];}else{echo '';}{/php}");
							}
						</style>
					</div>
					<!-- 详情end -->

					<!-- 房车服务机构start -->
					<div class="m0at pr w1200">
						<div class="camp p10">
							<div class="detail-tit-header">
								<h2 id="yingdijieshao">房车服务机构</h2>
							</div>
							<div class="camp-section mt15">
								{$carinfo.camps.content}
							</div>
							<div>
								<div class="camp-map" style="overflow:hidden;">
									<h3 class="pt10 f16" id="camp_map">地理位置</h3>
									<div class="details-photo details-photo-campmap">
										<div id="container" style="position:relative;"></div>
										<script type="text/javascript">
											//地图插件
											var map = new AMap.Map("container", {
												resizeEnable: true,
												center:[{$carinfo.camps.lng},{$carinfo.camps.lat}],
												zoom: 15
											});
											var marker = new AMap.Marker({
												position: [{$carinfo.camps.lng},{$carinfo.camps.lat}],
												draggable: true,
												cursor: 'move',
												raiseOnDrag: true
											});
											marker.setMap(map);
											//为地图注册click事件获取鼠标点击出的经纬度坐标
											var clickEventListener = map.on('click', function(e) {
												document.getElementById("lnglat").value = e.lnglat.getLng() + ',' + e.lnglat.getLat();
												document.getElementById("lng").value = e.lnglat.getLng();
												document.getElementById("lat").value = e.lnglat.getLat();
												marker.setPosition([e.lnglat.getLng(), e.lnglat.getLat()])
											});
											var auto = new AMap.Autocomplete({
												input: "tipinput"
											});
											AMap.event.addListener(auto, "select", select); //注册监听，当选中某条记录时会触发
											function select(e) {
												if (e.poi && e.poi.location) {
													map.setZoom(15);
													map.setCenter(e.poi.location);
													document.getElementById("lnglat").value = e.poi.location.getLng() + ',' + e.poi.location.getLat();
													document.getElementById("lng").value = e.poi.location.getLng();
													document.getElementById("lat").value = e.poi.location.getLat();
													marker.setPosition([e.poi.location.getLng(), e.poi.location.getLat()])
												}
											}
										</script>
									</div>
								</div>
							</div>
						</div>
					</div>
					<!-- 房车服务机构end -->
					
				</div>
			</div>
		</main>
		<!--内容部分结束-->

		<!--双辉币不足提示框开始-->
		<div id="shsy-coin-bounced-box" style="display:none;">
			<div id="shsy-coin-bounced">
				<div class="shsy-bounced-info">
					<div class="shsy-prompt-title">
						<p class="shsy-prompt">温馨提示</p>
						<p class="shsy-close">关闭</p>
					</div>
					<div class="shsy-prompt-cont">您的双辉币余额不足，请分享房车获得双辉币</div>
					<div class="shsy-prompt-over">
						<a href="###">去分享</a>
					</div>
				</div>
			</div>
		</div>
		<!--双辉币不足提示框结束-->
	</body>
</html>

                            